import request from '@/utils/request'

export const getCategories = (params) => {
  return request('/categories', params)
}

// 级联
export const getCategory = () => {
  return request('/categories', {
    params: {
      type: 2
    }
  })
}

// 添加
export const addCategory = (data) => {
  return request.post('/categories', data)
}
